Optimal. Leaf size=217 \[ \frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \text {ArcTan}\left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \text {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \text {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-3 n} (e x)^{3 n} \text {PolyLog}\left (3,-i e^{c+d x^n}\right )}{d^3 e n}-\frac {2 i b x^{-3 n} (e x)^{3 n} \text {PolyLog}\left (3,i e^{c+d x^n}\right )}{d^3 e n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 217, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {14, 5548,
5544, 4265, 2611, 2320, 6724} \begin {gather*} \frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \text {ArcTan}\left (e^{c+d x^n}\right )}{d e n}+\frac {2 i b x^{-3 n} (e x)^{3 n} \text {Li}_3\left (-i e^{d x^n+c}\right )}{d^3 e n}-\frac {2 i b x^{-3 n} (e x)^{3 n} \text {Li}_3\left (i e^{d x^n+c}\right )}{d^3 e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (-i e^{d x^n+c}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (i e^{d x^n+c}\right )}{d^2 e n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2320
Rule 2611
Rule 4265
Rule 5544
Rule 5548
Rule 6724
Rubi steps
\begin {align*} \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx &=\int \left (a (e x)^{-1+3 n}+b (e x)^{-1+3 n} \text {sech}\left (c+d x^n\right )\right ) \, dx\\ &=\frac {a (e x)^{3 n}}{3 e n}+b \int (e x)^{-1+3 n} \text {sech}\left (c+d x^n\right ) \, dx\\ &=\frac {a (e x)^{3 n}}{3 e n}+\frac {\left (b x^{-3 n} (e x)^{3 n}\right ) \int x^{-1+3 n} \text {sech}\left (c+d x^n\right ) \, dx}{e}\\ &=\frac {a (e x)^{3 n}}{3 e n}+\frac {\left (b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int x^2 \text {sech}(c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int x \log \left (1-i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}+\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int x \log \left (1+i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}\\ &=\frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (i e^{c+d x^n}\right )}{d^2 e n}+\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \text {Li}_2\left (-i e^{c+d x}\right ) \, dx,x,x^n\right )}{d^2 e n}-\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \text {Li}_2\left (i e^{c+d x}\right ) \, dx,x,x^n\right )}{d^2 e n}\\ &=\frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (i e^{c+d x^n}\right )}{d^2 e n}+\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^3 e n}-\frac {\left (2 i b x^{-3 n} (e x)^{3 n}\right ) \text {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^3 e n}\\ &=\frac {a (e x)^{3 n}}{3 e n}+\frac {2 b x^{-n} (e x)^{3 n} \tan ^{-1}\left (e^{c+d x^n}\right )}{d e n}-\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-2 n} (e x)^{3 n} \text {Li}_2\left (i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i b x^{-3 n} (e x)^{3 n} \text {Li}_3\left (-i e^{c+d x^n}\right )}{d^3 e n}-\frac {2 i b x^{-3 n} (e x)^{3 n} \text {Li}_3\left (i e^{c+d x^n}\right )}{d^3 e n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 7.20, size = 0, normalized size = 0.00 \begin {gather*} \int (e x)^{-1+3 n} \left (a+b \text {sech}\left (c+d x^n\right )\right ) \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.63, size = 0, normalized size = 0.00 \[\int \left (e x \right )^{3 n -1} \left (a +b \,\mathrm {sech}\left (c +d \,x^{n}\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 933 vs. \(2 (200) = 400\).
time = 0.42, size = 933, normalized size = 4.30 \begin {gather*} \frac {{\left (a d^{3} \cosh \left (3 \, n - 1\right ) + a d^{3} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right )^{3} + 3 \, {\left (a d^{3} \cosh \left (3 \, n - 1\right ) + a d^{3} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right )^{2} \sinh \left (n \log \left (x\right )\right ) + 3 \, {\left (a d^{3} \cosh \left (3 \, n - 1\right ) + a d^{3} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right ) \sinh \left (n \log \left (x\right )\right )^{2} + {\left (a d^{3} \cosh \left (3 \, n - 1\right ) + a d^{3} \sinh \left (3 \, n - 1\right )\right )} \sinh \left (n \log \left (x\right )\right )^{3} - 6 \, {\left ({\left (-i \, b d \cosh \left (3 \, n - 1\right ) - i \, b d \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right ) + {\left (-i \, b d \cosh \left (3 \, n - 1\right ) - i \, b d \sinh \left (3 \, n - 1\right )\right )} \sinh \left (n \log \left (x\right )\right )\right )} {\rm Li}_2\left (i \, \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + i \, \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right )\right ) - 6 \, {\left ({\left (i \, b d \cosh \left (3 \, n - 1\right ) + i \, b d \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right ) + {\left (i \, b d \cosh \left (3 \, n - 1\right ) + i \, b d \sinh \left (3 \, n - 1\right )\right )} \sinh \left (n \log \left (x\right )\right )\right )} {\rm Li}_2\left (-i \, \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - i \, \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right )\right ) - 3 \, {\left (-i \, b c^{2} \cosh \left (3 \, n - 1\right ) - i \, b c^{2} \sinh \left (3 \, n - 1\right )\right )} \log \left (\cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + i\right ) - 3 \, {\left (i \, b c^{2} \cosh \left (3 \, n - 1\right ) + i \, b c^{2} \sinh \left (3 \, n - 1\right )\right )} \log \left (\cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - i\right ) - 3 \, {\left (-i \, b c^{2} \cosh \left (3 \, n - 1\right ) - i \, b c^{2} \sinh \left (3 \, n - 1\right ) + {\left (i \, b d^{2} \cosh \left (3 \, n - 1\right ) + i \, b d^{2} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right )^{2} + 2 \, {\left (i \, b d^{2} \cosh \left (3 \, n - 1\right ) + i \, b d^{2} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right ) \sinh \left (n \log \left (x\right )\right ) + {\left (i \, b d^{2} \cosh \left (3 \, n - 1\right ) + i \, b d^{2} \sinh \left (3 \, n - 1\right )\right )} \sinh \left (n \log \left (x\right )\right )^{2}\right )} \log \left (i \, \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + i \, \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + 1\right ) - 3 \, {\left (i \, b c^{2} \cosh \left (3 \, n - 1\right ) + i \, b c^{2} \sinh \left (3 \, n - 1\right ) + {\left (-i \, b d^{2} \cosh \left (3 \, n - 1\right ) - i \, b d^{2} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right )^{2} + 2 \, {\left (-i \, b d^{2} \cosh \left (3 \, n - 1\right ) - i \, b d^{2} \sinh \left (3 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right ) \sinh \left (n \log \left (x\right )\right ) + {\left (-i \, b d^{2} \cosh \left (3 \, n - 1\right ) - i \, b d^{2} \sinh \left (3 \, n - 1\right )\right )} \sinh \left (n \log \left (x\right )\right )^{2}\right )} \log \left (-i \, \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - i \, \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + 1\right ) - 6 \, {\left (i \, b \cosh \left (3 \, n - 1\right ) + i \, b \sinh \left (3 \, n - 1\right )\right )} {\rm polylog}\left (3, i \, \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + i \, \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right )\right ) - 6 \, {\left (-i \, b \cosh \left (3 \, n - 1\right ) - i \, b \sinh \left (3 \, n - 1\right )\right )} {\rm polylog}\left (3, -i \, \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - i \, \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right )\right )}{3 \, d^{3} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (e x\right )^{3 n - 1} \left (a + b \operatorname {sech}{\left (c + d x^{n} \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (a+\frac {b}{\mathrm {cosh}\left (c+d\,x^n\right )}\right )\,{\left (e\,x\right )}^{3\,n-1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________